<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="utf-8" />
   
  <meta name="keywords" content="郑浩枫,周芳怡,咸鱼郑某的博客" />
   
  <meta name="description" content="咸鱼郑某的博客" />
  
  <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1" />
  <title>
    Ayer中文说明 |  岛
  </title>
  <meta name="generator" content="hexo-theme-yilia-plus">
  
  <link rel="shortcut icon" href="/favicon.ico" />
  
  
<link rel="stylesheet" href="/css/main.css">

  
  <script src="https://cdn.jsdelivr.net/npm/pace-js@1.0.2/pace.min.js"></script>
  
  

  

<link rel="alternate" href="/atom.xml" title="岛" type="application/atom+xml">
</head>

</html>

<body>
  <div id="app">
    <main class="content">
      <section class="outer">
  <article id="post-Ayer中文说明" class="article article-type-post" itemscope
  itemprop="blogPost" data-scroll-reveal>

  <div class="article-inner">
    
    <header class="article-header">
       
<h1 class="article-title sea-center" style="border-left:0" itemprop="name">
  Ayer中文说明
</h1>
  

    </header>
    

    
    <div class="article-meta">
      <a href="/2019/ayer/" class="article-date">
  <time datetime="2019-12-03T05:26:02.000Z" itemprop="datePublished">2019-12-03</time>
</a>
      
  <div class="article-category">
    <a class="article-category-link" href="/categories/%E5%8D%9A%E5%AE%A2/">博客</a>
  </div>

      
      
<div class="word_count">
    <span class="post-time">
        <span class="post-meta-item-icon">
            <i class="ri-quill-pen-line"></i>
            <span class="post-meta-item-text"> 字数统计:</span>
            <span class="post-count">3k字</span>
        </span>
    </span>

    <span class="post-time">
        &nbsp; | &nbsp;
        <span class="post-meta-item-icon">
            <i class="ri-book-open-line"></i>
            <span class="post-meta-item-text"> 阅读时长≈</span>
            <span class="post-count">11分钟</span>
        </span>
    </span>
</div>

      
    </div>
    

    
    
    <div class="tocbot"></div>





    

    
    <div class="article-entry" itemprop="articleBody">
      
      

      
      <h1 id="介绍"><a href="#介绍" class="headerlink" title="介绍"></a>介绍</h1><p>本博客使用的主题作者是“沈宇”</p>
<p>所以特意保留 一篇原作者对主题“Ayer”的介绍，以示尊敬</p>
<blockquote>
<p><a target="_blank" rel="noopener" href="https://github.com/Shen-Yu/hexo-theme-ayer">Ayer</a> 是一个干净且优雅的Hexo主题，自带响应式，加载速度很快，该有的功能都有，可配置项很多，非常适合作为你的博客主题，主题内还附送了6张精美的高清壁纸。欢迎使用和Star支持，如果你在使用过程中有任何疑问或者建议，欢迎联系我！如果你的博客采用了本主题，欢迎在下面评论区留下地址~</p>
</blockquote>
<p><a target="_blank" rel="noopener" href="https://github.com/Shen-Yu/hexo-theme-ayer">Ayer</a> 在马来语中是“水”的意思，在西班牙语中是“昨天”的意思。</p>
<p><img src="https://pic.downk.cc/item/5e739724e83c3a1e3ab53941.jpg" alt="hexo-theme-ayer"></p>
<p><a target="_blank" rel="noopener" href="https://github.com/Shen-Yu/hexo-theme-ayer">GitHub地址</a></p>
<p><a target="_blank" rel="noopener" href="https://gitee.com/shen-yu/hexo-theme-ayer">国内镜像</a></p>
<p><a target="_blank" rel="noopener" href="https://shen-yu.gitee.io/">效果预览</a></p>
<p><a target="_blank" rel="noopener" href="https://shen-yu.gitee.io/2019/ayer/">中文说明</a></p>
<span id="more"></span>

<h1 id="特性"><a href="#特性" class="headerlink" title="特性"></a>特性</h1><ol>
<li>干净且优雅，文章内容美观易读</li>
<li>首页封面全屏平铺，扁平化设计，简洁又不失高大上</li>
<li>响应式设计，博客在桌面端、平板、手机等设备上均能很好的展现</li>
<li>首页封面和文案可以任意更换，主题内附送6张精美高清壁纸</li>
<li>时间轴式的归档页</li>
<li>侧边栏可以点击显示或隐藏</li>
<li>支持文章置顶和文章打赏</li>
<li>支持文章字数和阅读时长统计</li>
<li>支持网易云音乐播放</li>
<li>支持 <code>MathJax</code> 数学公式</li>
<li><code>TOC</code> 目录在文章页悬浮，跳转更方便</li>
<li>可设置阅读文章时做密码验证（<a target="_blank" rel="noopener" href="https://github.com/MikeCoder/hexo-blog-encrypt/blob/master/ReadMe.zh.md">hexo-blog-encrypt</a>）</li>
<li><a target="_blank" rel="noopener" href="https://valine.js.org/">Valine</a>和<a target="_blank" rel="noopener" href="https://gitalk.github.io/">Gitalk</a>评论模块（推荐配合<code>leancloud</code>使用 <code>Valine</code>）</li>
<li>集成了不蒜子、百度统计、Google Analytics、CNZZ等统计功能</li>
<li>支持Github Ribbons</li>
</ol>
<p>如果想体验手机端浏览效果，可以扫一下二维码：</p>
<p><img src="https://pic.downk.cc/item/5e739676e83c3a1e3ab4b372.jpg" alt="手机端效果"> </p>
<h1 id="打赏"><a href="#打赏" class="headerlink" title="打赏"></a>打赏</h1><p>本主题完全开源且免费，目前由我一个人维护，如果你觉得主题不错，你可以选择继续白嫖，也可以选择适当打赏我，不在于金额多少，而是能让我更有动力去维护这个主题。打赏请备注说明，谢谢~</p>
<div style="width:100%;text-align:center;font-weight:bold">
<span style="width:30%;display:inline-block">
微信
<img src="https://pic.downk.cc/item/5e75c6079d7d586a54ce7611.png" alt="wechat" style="width:100%"></span>
<span style="width:30%;;display:inline-block">
支付宝
<img src="https://pic.downk.cc/item/5e75c6079d7d586a54ce7613.jpg" alt="alipay" style="width:100%"></span>
</div>

<h1 id="安装"><a href="#安装" class="headerlink" title="安装"></a>安装</h1><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><code class="hljs bash"><span class="hljs-comment"># 国内用户如果速度较慢，可以把github地址替换为：https://gitee.com/shen-yu/hexo-theme-ayer.git</span><br>git <span class="hljs-built_in">clone</span> https://github.com/Shen-Yu/hexo-theme-ayer.git themes/ayer<br></code></pre></td></tr></table></figure>

<h1 id="修改"><a href="#修改" class="headerlink" title="修改"></a>修改</h1><p>将博客根目录下的 <code>_config.yml</code> 里的 <code>theme</code> 值修改成 <code>ayer</code></p>
<figure class="highlight yml"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><code class="hljs yml"><span class="hljs-attr">theme:</span> <span class="hljs-string">ayer</span><br></code></pre></td></tr></table></figure>

<h1 id="更新"><a href="#更新" class="headerlink" title="更新"></a>更新</h1><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><code class="hljs bash"><span class="hljs-built_in">cd</span> themes/ayer<br>git pull<br></code></pre></td></tr></table></figure>

<h1 id="主题配置"><a href="#主题配置" class="headerlink" title="主题配置"></a>主题配置</h1><p>以下是ayer主题目录下的 <code>_config.yml</code>文件配置，请先确保你已经读过<a target="_blank" rel="noopener" href="https://hexo.io/zh-cn/docs/">Hexo文档</a>。如果你在配置过程中有问题，请先擅用 <a target="_blank" rel="noopener" href="https://cn.bing.com/">搜索引擎</a>。如果你搜不到解决方法，你可以参考：<a target="_blank" rel="noopener" href="https://gitee.com/shen-yu/shen-yu/tree/dev/">我的博客源码</a>，按照我的一模一样配肯定是不会有问题的。如果对部分字体或颜色等有定制需求，请自行在css文件进行修改，主题本身已经很符合审美，自定义配置项也很多，不建议改得花里胡哨，过大的字体和库都会影响博客加载速度。如果还有问题或者建议，那么请在评论区给我留言~</p>
<figure class="highlight yml"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br><span class="line">28</span><br><span class="line">29</span><br><span class="line">30</span><br><span class="line">31</span><br><span class="line">32</span><br><span class="line">33</span><br><span class="line">34</span><br><span class="line">35</span><br><span class="line">36</span><br><span class="line">37</span><br><span class="line">38</span><br><span class="line">39</span><br><span class="line">40</span><br><span class="line">41</span><br><span class="line">42</span><br><span class="line">43</span><br><span class="line">44</span><br><span class="line">45</span><br><span class="line">46</span><br><span class="line">47</span><br><span class="line">48</span><br><span class="line">49</span><br><span class="line">50</span><br><span class="line">51</span><br><span class="line">52</span><br><span class="line">53</span><br><span class="line">54</span><br><span class="line">55</span><br><span class="line">56</span><br><span class="line">57</span><br><span class="line">58</span><br><span class="line">59</span><br><span class="line">60</span><br><span class="line">61</span><br><span class="line">62</span><br><span class="line">63</span><br><span class="line">64</span><br><span class="line">65</span><br><span class="line">66</span><br><span class="line">67</span><br><span class="line">68</span><br><span class="line">69</span><br><span class="line">70</span><br><span class="line">71</span><br><span class="line">72</span><br><span class="line">73</span><br><span class="line">74</span><br><span class="line">75</span><br><span class="line">76</span><br><span class="line">77</span><br><span class="line">78</span><br><span class="line">79</span><br><span class="line">80</span><br><span class="line">81</span><br><span class="line">82</span><br><span class="line">83</span><br><span class="line">84</span><br><span class="line">85</span><br><span class="line">86</span><br><span class="line">87</span><br><span class="line">88</span><br><span class="line">89</span><br><span class="line">90</span><br><span class="line">91</span><br><span class="line">92</span><br><span class="line">93</span><br><span class="line">94</span><br><span class="line">95</span><br><span class="line">96</span><br><span class="line">97</span><br><span class="line">98</span><br><span class="line">99</span><br><span class="line">100</span><br><span class="line">101</span><br><span class="line">102</span><br><span class="line">103</span><br><span class="line">104</span><br><span class="line">105</span><br><span class="line">106</span><br><span class="line">107</span><br><span class="line">108</span><br><span class="line">109</span><br><span class="line">110</span><br><span class="line">111</span><br><span class="line">112</span><br><span class="line">113</span><br><span class="line">114</span><br><span class="line">115</span><br><span class="line">116</span><br><span class="line">117</span><br><span class="line">118</span><br><span class="line">119</span><br><span class="line">120</span><br><span class="line">121</span><br><span class="line">122</span><br><span class="line">123</span><br><span class="line">124</span><br><span class="line">125</span><br><span class="line">126</span><br><span class="line">127</span><br><span class="line">128</span><br><span class="line">129</span><br><span class="line">130</span><br><span class="line">131</span><br><span class="line">132</span><br><span class="line">133</span><br><span class="line">134</span><br><span class="line">135</span><br><span class="line">136</span><br><span class="line">137</span><br><span class="line">138</span><br><span class="line">139</span><br><span class="line">140</span><br><span class="line">141</span><br><span class="line">142</span><br><span class="line">143</span><br><span class="line">144</span><br><span class="line">145</span><br><span class="line">146</span><br><span class="line">147</span><br><span class="line">148</span><br><span class="line">149</span><br><span class="line">150</span><br><span class="line">151</span><br><span class="line">152</span><br><span class="line">153</span><br><span class="line">154</span><br><span class="line">155</span><br><span class="line">156</span><br><span class="line">157</span><br><span class="line">158</span><br><span class="line">159</span><br><span class="line">160</span><br></pre></td><td class="code"><pre><code class="hljs yml"><span class="hljs-comment"># 侧边栏菜单</span><br><span class="hljs-attr">menu:</span><br>  <span class="hljs-string">主页:</span> <span class="hljs-string">/</span><br>  <span class="hljs-string">归档:</span> <span class="hljs-string">/archives</span><br>  <span class="hljs-string">分类:</span> <span class="hljs-string">/categories</span><br>  <span class="hljs-string">标签:</span> <span class="hljs-string">/tags</span><br>  <span class="hljs-string">摄影:</span> <span class="hljs-string">http://shenyu-vip.lofter.com</span><br>  <span class="hljs-string">旅行:</span> <span class="hljs-string">/tags/旅行/</span><br>  <span class="hljs-string">关于我:</span> <span class="hljs-string">/2019/about</span><br><br><span class="hljs-comment"># 站点次标题和打字动效</span><br><span class="hljs-comment"># https://github.com/mattboldt/typed.js</span><br><span class="hljs-attr">subtitle:</span><br>  <span class="hljs-attr">enable:</span> <span class="hljs-literal">true</span>  <span class="hljs-comment"># 是否开启动效</span><br>  <span class="hljs-attr">text:</span> <span class="hljs-string">面朝大海，春暖花开</span>  <span class="hljs-comment"># 显示的文字</span><br>  <span class="hljs-attr">text2:</span> <span class="hljs-string">愿你一生努力，一生被爱</span>   <span class="hljs-comment"># 滚动播放，如果不需要可以留空</span><br>  <span class="hljs-attr">text3:</span> <span class="hljs-string">想要的都拥有，得不到的都释怀</span>  <span class="hljs-comment"># 最多支持三段文字</span><br>  <span class="hljs-attr">startDelay:</span> <span class="hljs-number">0</span>   <span class="hljs-comment"># 延迟时间</span><br>  <span class="hljs-attr">typeSpeed:</span> <span class="hljs-number">200</span>  <span class="hljs-comment"># 打字速度</span><br>  <span class="hljs-attr">loop:</span> <span class="hljs-literal">true</span>  <span class="hljs-comment"># 是否循环</span><br>  <span class="hljs-attr">backSpeed:</span> <span class="hljs-number">100</span>  <span class="hljs-comment"># 回退速度</span><br>  <span class="hljs-attr">showCursor:</span> <span class="hljs-literal">true</span>  <span class="hljs-comment"># 是否显示光标</span><br><br><span class="hljs-comment"># 网站图标和侧边栏logo</span><br><span class="hljs-attr">favicon:</span> <span class="hljs-string">/favicon.ico</span><br><span class="hljs-attr">logo:</span> <span class="hljs-string">/images/ayer-side.svg</span><br><br><span class="hljs-comment"># 封面配置</span><br><span class="hljs-comment"># enable-是否启用封面；path-封面背景图；logo-封面logo</span><br><span class="hljs-attr">cover:</span><br>  <span class="hljs-attr">enable:</span> <span class="hljs-literal">true</span><br>  <span class="hljs-attr">path:</span> <span class="hljs-string">/images/cover1.jpg</span>  <span class="hljs-comment"># /source/images目录下附送多张精美壁纸，可任意更换</span><br>  <span class="hljs-attr">logo:</span> <span class="hljs-string">/images/ayer.svg</span>  <span class="hljs-comment"># 如果不要直接设置成false</span><br><br><span class="hljs-comment"># 页面顶部进度条  </span><br><span class="hljs-attr">progressBar:</span> <span class="hljs-literal">true</span><br><br><span class="hljs-comment"># 网易云音乐插件</span><br><span class="hljs-attr">music:</span><br>  <span class="hljs-attr">enable:</span> <span class="hljs-literal">false</span><br>  <span class="hljs-comment"># 播放器尺寸类型(1：小尺寸、2：大尺寸)</span><br>  <span class="hljs-attr">type:</span> <span class="hljs-number">1</span><br>  <span class="hljs-attr">id:</span> <span class="hljs-number">518895142</span>  <span class="hljs-comment"># 网易云分享的音乐ID(更换音乐请更改此配置项)</span><br>  <span class="hljs-attr">autoPlay:</span> <span class="hljs-literal">true</span>  <span class="hljs-comment"># 是否开启自动播放</span><br><br><span class="hljs-comment"># 文章配置</span><br><span class="hljs-comment"># 文章太长，截断按钮文字(在需要截断的行增加此标记：&lt;!--more--&gt;)</span><br><span class="hljs-attr">excerpt_link:</span> <span class="hljs-string">阅读更多...</span><br><span class="hljs-comment"># 如果你嫌每篇文章手动加more标记比较麻烦，又不想在首页全文显示，可以把excerpt_all设置成true，这样首页只会显示文章归档</span><br><span class="hljs-attr">excerpt_all:</span> <span class="hljs-literal">false</span><br><br><span class="hljs-comment"># 是否开启文章分享按钮</span><br><span class="hljs-attr">share_enable:</span> <span class="hljs-literal">true</span><br><span class="hljs-comment"># 国内的社交平台(If you are not in China, maybe you prefer to set:false)</span><br><span class="hljs-attr">share_china:</span> <span class="hljs-literal">true</span><br><span class="hljs-comment"># 文章分享文字</span><br><span class="hljs-attr">share_text:</span> <span class="hljs-string">分享</span><br><br><span class="hljs-comment"># 分页文字</span><br><span class="hljs-attr">nav_text:</span><br>  <span class="hljs-attr">page_prev:</span> <span class="hljs-string">上一页</span><br>  <span class="hljs-attr">page_next:</span> <span class="hljs-string">下一页</span><br>  <span class="hljs-attr">post_prev:</span> <span class="hljs-string">上一篇</span><br>  <span class="hljs-attr">post_next:</span> <span class="hljs-string">下一篇</span><br><br><span class="hljs-comment"># 文章页是否显示目录</span><br><span class="hljs-attr">toc:</span> <span class="hljs-literal">true</span><br><br><span class="hljs-comment"># 文章中的图片是否支持点击放大</span><br><span class="hljs-attr">image_viewer:</span> <span class="hljs-literal">true</span><br><br><span class="hljs-comment"># https://github.com/willin/hexo-wordcount</span><br><span class="hljs-comment"># 是否开启字数统计(关闭请设置enable为false)</span><br><span class="hljs-comment"># 也可以单独在md文件里Front-matter设置`no_word_count: true`属性，来自定义关闭字数统计</span><br><span class="hljs-attr">word_count:</span><br>  <span class="hljs-attr">enable:</span> <span class="hljs-literal">true</span><br>  <span class="hljs-comment"># 只在文章详情显示(不在首页显示)</span><br>  <span class="hljs-attr">only_article_visit:</span> <span class="hljs-literal">true</span><br><br><span class="hljs-comment"># 打赏</span><br><span class="hljs-comment"># 打赏type设定：0-关闭打赏； 1-文章对应的md文件里有reward:true属性，才有打赏； 2-默认开启所有文章均有打赏，如果有些文章你不需要，请在文章对应的md文件里设置no_reward:true</span><br><span class="hljs-attr">reward_type:</span> <span class="hljs-number">1</span><br><span class="hljs-comment"># 打赏wording</span><br><span class="hljs-attr">reward_wording:</span> <span class="hljs-string">&#x27;请我喝杯咖啡吧~&#x27;</span><br><span class="hljs-comment"># 支付宝二维码图片地址，跟你设置logo的方式一样。比如：/images/alipay.jpg</span><br><span class="hljs-attr">alipay:</span> <span class="hljs-string">/images/alipay.jpg</span><br><span class="hljs-comment"># 微信二维码图片地址</span><br><span class="hljs-attr">weixin:</span> <span class="hljs-string">/images/wechat.jpg</span><br><br><span class="hljs-comment"># 版权声明</span><br><span class="hljs-comment"># 版权声明type设定：0-关闭版权声明； 1-文章对应的md文件里有copyright: true属性，才有版权声明； 2-所有文章均有版权声明</span><br><span class="hljs-attr">copyright_type:</span> <span class="hljs-number">2</span><br><br><span class="hljs-comment"># 是否启用搜索</span><br><span class="hljs-attr">search:</span> <span class="hljs-literal">true</span><br><br><span class="hljs-comment"># RSS订阅(先安装hexo-generator-feed插件，再去博客根目录config进行配置)</span><br><span class="hljs-attr">rss:</span> <span class="hljs-string">/atom.xml</span><br><br><span class="hljs-comment"># 评论：1、Valine(推荐)；2、Gitalk</span><br><br><span class="hljs-comment"># 1、Valine[一款快速、简洁且高效的无后端评论系统](https://github.com/xCss/Valine)</span><br><span class="hljs-comment"># 启用Valine必须先创建leancloud应用， 注册账号后获取 id|key 填入即可</span><br><span class="hljs-attr">leancloud:</span>  <br>  <span class="hljs-attr">enable:</span> <span class="hljs-literal">true</span><br>  <span class="hljs-attr">app_id:</span> <span class="hljs-comment">#</span><br>  <span class="hljs-attr">app_key:</span> <span class="hljs-comment">#</span><br><span class="hljs-comment"># Valine配置(如果有些文章你想关闭评论，请在文章对应的md文件里设置no_valine:true)</span><br><span class="hljs-attr">valine:</span><br>  <span class="hljs-attr">enable:</span> <span class="hljs-literal">true</span> <span class="hljs-comment"># 是否启用</span><br>  <span class="hljs-attr">verify:</span> <span class="hljs-literal">false</span> <span class="hljs-comment"># 是否开启防垃圾评论验证</span><br>  <span class="hljs-attr">notify:</span> <span class="hljs-literal">false</span> <span class="hljs-comment"># 是否开启邮件提醒(https://valine.js.org/notify.html)</span><br>  <span class="hljs-attr">avatar:</span> <span class="hljs-string">mp</span> <span class="hljs-comment"># 头像样式(https://valine.js.org/avatar.html)</span><br>  <span class="hljs-attr">placeholder:</span> <span class="hljs-string">给我的文章加点评论吧~</span> <span class="hljs-comment"># placeholder</span><br><br><span class="hljs-comment"># 2、Gitalk(https://github.com/gitalk/gitalk)</span><br><span class="hljs-attr">gitalk:</span><br>  <span class="hljs-attr">enable:</span> <span class="hljs-literal">false</span> <span class="hljs-comment"># true</span><br>  <span class="hljs-attr">clientID:</span> <span class="hljs-comment"># GitHub Application Client ID</span><br>  <span class="hljs-attr">clientSecret:</span> <span class="hljs-comment"># Client Secret</span><br>  <span class="hljs-attr">repo:</span> <span class="hljs-comment"># Repository name</span><br>  <span class="hljs-attr">owner:</span> <span class="hljs-comment"># GitHub ID</span><br>  <span class="hljs-attr">admin:</span> <span class="hljs-comment"># GitHub ID</span><br>  <br><span class="hljs-comment"># GitHub Ribbons-封面右上角的forkme</span><br><span class="hljs-attr">github:</span> <br>  <span class="hljs-comment"># (关闭请设置为false)</span><br>  <span class="hljs-attr">url:</span> <span class="hljs-string">https://github.com/Shen-Yu/hexo-theme-ayer</span><br><br><span class="hljs-comment"># fancybox(仅用于相册展示，若需要可配置albums)</span><br><span class="hljs-attr">fancybox:</span> <span class="hljs-literal">true</span><br><br><span class="hljs-comment"># 访问量统计(不蒜子)</span><br><span class="hljs-attr">busuanzi:</span><br>  <span class="hljs-attr">enable:</span> <span class="hljs-literal">true</span><br><br><span class="hljs-comment"># 友盟cnzz统计(url填js代码src链接)</span><br><span class="hljs-attr">cnzz:</span><br>  <span class="hljs-attr">enable:</span> <span class="hljs-literal">true</span><br>  <span class="hljs-attr">url:</span> <span class="hljs-comment">#</span><br><br><span class="hljs-comment"># Google Analytics</span><br><span class="hljs-attr">google_analytics:</span> <span class="hljs-string">&#x27;&#x27;</span><br><span class="hljs-comment"># 百度统计</span><br><span class="hljs-attr">baidu_analytics:</span> <span class="hljs-string">&#x27;&#x27;</span><br><br><span class="hljs-comment"># 数学公式</span><br><span class="hljs-attr">mathjax:</span> <span class="hljs-literal">true</span><br><br><span class="hljs-comment"># 网站成立年份(默认为 2019，若填入年份小于当前年份，则显示为 2018-2019 类似的格式)</span><br><span class="hljs-attr">since:</span> <span class="hljs-number">2019</span><br><br><span class="hljs-comment">#是否显示页脚信息(建议保留，有助于本主题的推广)</span><br><span class="hljs-attr">pageFooter:</span> <span class="hljs-literal">true</span><br><br><span class="hljs-comment">#ICP备案信息尾部显示</span><br><span class="hljs-attr">icp:</span><br>  <span class="hljs-attr">enable:</span> <span class="hljs-literal">false</span><br>  <span class="hljs-attr">url:</span> <span class="hljs-string">&#x27;http://www.beian.miit.gov.cn/&#x27;</span> <span class="hljs-comment"># 备案链接</span><br>  <span class="hljs-attr">text:</span> <span class="hljs-string">&#x27;浙ICP备88888888&#x27;</span> <span class="hljs-comment"># 备案信息</span><br></code></pre></td></tr></table></figure>


<h2 id="插件-必需"><a href="#插件-必需" class="headerlink" title="插件(必需)"></a>插件(必需)</h2><ul>
<li><p><a target="_blank" rel="noopener" href="https://github.com/theme-next/hexo-generator-searchdb">hexo-generator-searchdb</a> 用于搜索</p>
<figure class="highlight yml"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><code class="hljs yml"><span class="hljs-string">npm</span> <span class="hljs-string">install</span> <span class="hljs-string">hexo-generator-searchdb</span> <span class="hljs-string">--save</span><br></code></pre></td></tr></table></figure>
<p>然后将以下配置复制到你博客根目录下的 <code>_config.yml</code> 里（注意不是ayer目录下的）:</p>
<figure class="highlight yml"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br></pre></td><td class="code"><pre><code class="hljs yml"><span class="hljs-comment"># hexo-generator-searchdb</span><br><span class="hljs-attr">search:</span><br>  <span class="hljs-attr">path:</span> <span class="hljs-string">search.xml</span><br>  <span class="hljs-attr">field:</span> <span class="hljs-string">post</span><br>  <span class="hljs-attr">format:</span> <span class="hljs-string">html</span><br></code></pre></td></tr></table></figure></li>
<li><p><a target="_blank" rel="noopener" href="https://github.com/hexojs/hexo-generator-feed">hexo-generate-feed</a> 用于生成RSS订阅</p>
<figure class="highlight yml"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><code class="hljs yml"><span class="hljs-string">npm</span> <span class="hljs-string">install</span> <span class="hljs-string">hexo-generator-feed</span> <span class="hljs-string">--save</span><br></code></pre></td></tr></table></figure>

<p>  然后将以下配置复制到你博客根目录下的 <code>_config.yml</code> 里（注意不是ayer目录下的）:</p>
<figure class="highlight yml"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br></pre></td><td class="code"><pre><code class="hljs yml"><span class="hljs-attr">feed:</span><br>    <span class="hljs-attr">type:</span> <span class="hljs-string">atom</span><br>    <span class="hljs-attr">path:</span> <span class="hljs-string">atom.xml</span><br>    <span class="hljs-attr">limit:</span> <span class="hljs-number">20</span><br>    <span class="hljs-attr">hub:</span><br>    <span class="hljs-attr">content:</span><br>    <span class="hljs-attr">content_limit:</span> <span class="hljs-number">140</span><br>    <span class="hljs-attr">content_limit_delim:</span> <span class="hljs-string">&#x27; &#x27;</span><br>    <span class="hljs-attr">order_by:</span> <span class="hljs-string">-date</span>	<br></code></pre></td></tr></table></figure></li>
</ul>
<h2 id="插件-可选"><a href="#插件-可选" class="headerlink" title="插件(可选)"></a>插件(可选)</h2><ul>
<li><p><a target="_blank" rel="noopener" href="https://github.com/netcan/hexo-generator-index-pin-top">hexo-generator-index-pin-top</a> 用于文章置顶</p>
</li>
<li><p><a target="_blank" rel="noopener" href="https://github.com/MikeCoder/hexo-blog-encrypt/blob/master/ReadMe.zh.md">hexo-blog-encrypt</a> 用于文章加密</p>
</li>
<li><p><a target="_blank" rel="noopener" href="https://github.com/MoePlayer/hexo-tag-aplayer/blob/master/docs/README-zh_cn.md">hexo-tag-aplayer</a> 用于播放音乐</p>
</li>
<li><p><a target="_blank" rel="noopener" href="https://github.com/MoePlayer/hexo-tag-dplayer">hexo-tag-dplayer</a> 用于播放视频</p>
</li>
<li><p><a target="_blank" rel="noopener" href="https://github.com/EYHN/hexo-helper-live2d/blob/master/README.zh-CN.md">hexo-helper-live2d</a> 二次元看板娘</p>
</li>
</ul>
<p>更多插件请见 <a target="_blank" rel="noopener" href="https://hexo.io/plugins/">hexo插件市场</a></p>
<h2 id="分类"><a href="#分类" class="headerlink" title="分类"></a>分类</h2><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><code class="hljs bash">hexo new page categories<br></code></pre></td></tr></table></figure>
<p>然后将以下复制到/source/categories/index.md文件</p>
<figure class="highlight md"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br></pre></td><td class="code"><pre><code class="hljs md">---<br>title: categories<br>type: &quot;categories&quot;<br>layout: &quot;categories&quot;<br>---<br></code></pre></td></tr></table></figure>

<h2 id="标签"><a href="#标签" class="headerlink" title="标签"></a>标签</h2><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><code class="hljs bash">hexo new page tags<br></code></pre></td></tr></table></figure>
<p>配置同分类一样</p>
<h2 id="相册"><a href="#相册" class="headerlink" title="相册"></a>相册</h2><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><code class="hljs bash">hexo new page photos<br></code></pre></td></tr></table></figure>
<p>然后将以下复制到/source/photos/index.md文件，img_url替换成图片路径，caption替换成图片名称</p>
<figure class="highlight md"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br></pre></td><td class="code"><pre><code class="hljs md">---<br>title: Gallery<br><br>albums: [<br><span class="hljs-code">        [&quot;img_url&quot;,&quot;img_caption&quot;],</span><br><span class="hljs-code">        [&quot;img_url&quot;,&quot;img_caption&quot;]</span><br><span class="hljs-code">        ]</span><br><span class="hljs-code">---</span><br></code></pre></td></tr></table></figure>

<h2 id="文章目录"><a href="#文章目录" class="headerlink" title="文章目录"></a>文章目录</h2><p>用Tocbot解析文章标题并生成目录</p>
<ul>
<li><p>将以下配置复制到你ayer目录下的 <code>_config.yml</code> 里：</p>
  <figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><code class="hljs bash"><span class="hljs-comment"># Toc</span><br> toc: <span class="hljs-literal">true</span><br></code></pre></td></tr></table></figure></li>
<li><p>当然你可能并不想所有文章都生成悬浮目录，你可以在文章顶部的配置中加一行来进行关闭：</p>
  <figure class="highlight md"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><code class="hljs md">---<br>toc: false<br>---<br></code></pre></td></tr></table></figure></li>
</ul>
<hr>
<h1 id="常见问题"><a href="#常见问题" class="headerlink" title="常见问题"></a>常见问题</h1><h2 id="一-本地图片引用了却无法显示"><a href="#一-本地图片引用了却无法显示" class="headerlink" title="一.本地图片引用了却无法显示"></a>一.本地图片引用了却无法显示</h2><blockquote>
<p>插入图片的两种方法：1.引用图床，2.引用本地图片。为了防止路径出错，建议使用图床。</p>
</blockquote>
<h3 id="1-图床"><a href="#1-图床" class="headerlink" title="1.图床"></a>1.图床</h3><p>推荐使用：<a target="_blank" rel="noopener" href="https://sm.ms/">SM.MS</a>，<a target="_blank" rel="noopener" href="https://www.superbed.cn/">聚合图床</a></p>
<h3 id="2-本地图片"><a href="#2-本地图片" class="headerlink" title="2.本地图片"></a>2.本地图片</h3><p>建议在hexo创建的博客目录下的source中建立一个images文件夹专门放图片，路径：你的博客目录<code>/source/images</code>，如果还是无法显示，请尝试在文章里用html的img标签来引用本地图片。</p>
<h2 id="二-点击侧边栏页面无法显示"><a href="#二-点击侧边栏页面无法显示" class="headerlink" title="二.点击侧边栏页面无法显示"></a>二.点击侧边栏页面无法显示</h2><p>原因：ayer主题目录下的 <code>config.yml</code> 里menu属性的路径不对，这需要你根据页面路径手动配置。</p>
<p>以我的博客为例：</p>
<figure class="highlight yaml"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br></pre></td><td class="code"><pre><code class="hljs yaml"><span class="hljs-attr">menu:</span><br>  <span class="hljs-string">主页:</span> <span class="hljs-string">/</span><br>  <span class="hljs-string">归档:</span> <span class="hljs-string">/archives</span><br>  <span class="hljs-string">分类:</span> <span class="hljs-string">/categories</span><br>  <span class="hljs-string">标签:</span> <span class="hljs-string">/tags</span><br>  <span class="hljs-string">旅行:</span> <span class="hljs-string">/tags/旅行/</span><br>  <span class="hljs-string">摄影:</span> <span class="hljs-string">http://shenyu-vip.lofter.com</span><br>  <span class="hljs-string">关于我:</span> <span class="hljs-string">/2019/about</span><br></code></pre></td></tr></table></figure>

<p>上面的<code>归档/archives</code>是固定的，你不需要修改，<code>标签</code>和<code>分类</code>都需要手动创建目录，<code>旅行</code>实际上就是一个标签页，当你在文章头部设置tags属性后就会自动生成，<code>摄影</code>是一个站外的绝对路径，<code>关于我</code>实际上就是一个正常的文章页。好了，现在一个侧边栏导航就已经配置好了。</p>
<h2 id="三-为什么修改了配置却没有效果"><a href="#三-为什么修改了配置却没有效果" class="headerlink" title="三.为什么修改了配置却没有效果"></a>三.为什么修改了配置却没有效果</h2><p>建议每次生成站点或部署之前都用 <code>hexo clean</code> 命令清理一下缓存，另外你可能还需要刷新一下。</p>
<h2 id="四-怎么修改大标题和站点信息"><a href="#四-怎么修改大标题和站点信息" class="headerlink" title="四.怎么修改大标题和站点信息"></a>四.怎么修改大标题和站点信息</h2><p>站点配置文件<code>_config.yml</code>是hexo站点根目录下的主配置文件(还不知道是哪里的，自己google)，注意：别和<code>ayer</code>主题目录下的<code>_config.yml</code>搞混了。</p>
<p>修改网站各种资料，例如标题、副标题和邮箱等个人资料，请修改站点根目录下的<code>_config.yml</code></p>
<p>以我的博客为例：<br><img src="https://pic.downk.cc/item/5e75c69c9d7d586a54cf119d.jpg"></p>
<h2 id="五-怎么添加百度或谷歌统计"><a href="#五-怎么添加百度或谷歌统计" class="headerlink" title="五.怎么添加百度或谷歌统计"></a>五.怎么添加百度或谷歌统计</h2><h3 id="百度统计"><a href="#百度统计" class="headerlink" title="百度统计"></a>百度统计</h3><p>在ayer的config配置里的<code>baidu_analytics</code>填上百度统计代码中的hm.js问好后面那一串东西</p>
<h3 id="谷歌统计"><a href="#谷歌统计" class="headerlink" title="谷歌统计"></a>谷歌统计</h3><p>在ayer的config配置里的<code>google_analytics</code>填上谷歌统计代码的跟踪ID，即UA值(包含UA)</p>
<h2 id="六-怎么查看文章的访问量"><a href="#六-怎么查看文章的访问量" class="headerlink" title="六.怎么查看文章的访问量"></a>六.怎么查看文章的访问量</h2><p>在ayer的config配置里有<code>busuanzi</code>选项，默认设置为<code>enable:true</code>，就开启了站点访问量的统计，站点尾部左下角的<code>PV</code>代表了当前页的访问次数，<code>UV</code>代表了当前站点的访问人数。注意：不蒜子统计是根据当前域名来统计的，你在本地启动的时候由于是localhost，所以数字会很大，部署到线上之后就会根据域名重新统计。</p>
<h2 id="七-网易云音乐无法播放"><a href="#七-网易云音乐无法播放" class="headerlink" title="七.网易云音乐无法播放"></a>七.网易云音乐无法播放</h2><p>这是由于网易云音乐对部分歌曲做了版权限制，你可以多换几首试试，配置文件里的默认歌曲 <code>潮鳴り</code> 是可以播放的。如果你动手能力强，也可以试试音乐播放插件 <a target="_blank" rel="noopener" href="https://github.com/MoePlayer/hexo-tag-aplayer/blob/master/docs/README-zh_cn.md">hexo-tag-aplayer</a>，配合<code>MetingJS</code>可以支持对于 QQ音乐、网易云、虾米、酷狗、百度等平台的音乐播放。</p>
<h1 id="注释："><a href="#注释：" class="headerlink" title="注释："></a>注释：</h1><ol>
<li>最新版的HEXO中弃用了”use_date_for_updated”，改为”updated_option”请在_config.yml中改掉</li>
</ol>

      
      <!-- reward -->
      
      <div id="reward-btn">
        打赏
      </div>
      
    </div>
    
    
      <!-- copyright -->
      
        <div class="declare">
          <ul class="post-copyright">
            <li>
              <i class="ri-copyright-line"></i>
              <strong>版权声明： </strong s>
              本博客所有文章除特别声明外，均采用 <a href="https://www.apache.org/licenses/LICENSE-2.0.html" rel="external nofollow"
                target="_blank">Apache License 2.0</a> 许可协议。转载请注明出处！
            </li>
          </ul>
        </div>
        
    <footer class="article-footer">
      
          
<div class="share-btn">
      <span class="share-sns share-outer">
        <i class="ri-share-forward-line"></i>
        分享
      </span>
      <div class="share-wrap">
        <i class="arrow"></i>
        <div class="share-icons">
          
          <a class="weibo share-sns" href="javascript:;" data-type="weibo">
            <i class="ri-weibo-fill"></i>
          </a>
          <a class="weixin share-sns wxFab" href="javascript:;" data-type="weixin">
            <i class="ri-wechat-fill"></i>
          </a>
          <a class="qq share-sns" href="javascript:;" data-type="qq">
            <i class="ri-qq-fill"></i>
          </a>
          <a class="douban share-sns" href="javascript:;" data-type="douban">
            <i class="ri-douban-line"></i>
          </a>
          <!-- <a class="qzone share-sns" href="javascript:;" data-type="qzone">
            <i class="icon icon-qzone"></i>
          </a> -->
          
          <a class="facebook share-sns" href="javascript:;" data-type="facebook">
            <i class="ri-facebook-circle-fill"></i>
          </a>
          <a class="twitter share-sns" href="javascript:;" data-type="twitter">
            <i class="ri-twitter-fill"></i>
          </a>
          <a class="google share-sns" href="javascript:;" data-type="google">
            <i class="ri-google-fill"></i>
          </a>
        </div>
      </div>
</div>

<div class="wx-share-modal">
    <a class="modal-close" href="javascript:;"><i class="ri-close-circle-line"></i></a>
    <p>扫一扫，分享到微信</p>
    <div class="wx-qrcode">
      <img src="//api.qrserver.com/v1/create-qr-code/?size=150x150&data=https://zhfhz.gitee.io/2019/ayer/" alt="微信分享二维码">
    </div>
</div>

<div id="share-mask"></div>
      
      
  <ul class="article-tag-list" itemprop="keywords"><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/%E5%8D%9A%E5%AE%A2/" rel="tag">博客</a></li><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/%E6%8A%80%E6%9C%AF/" rel="tag">技术</a></li></ul>


    </footer>

  </div>

  
  
  <nav class="article-nav">
    
      <a href="/2020/%E9%83%A8%E7%BD%B2Hexo/" class="article-nav-link">
        <strong class="article-nav-caption">上一篇</strong>
        <div class="article-nav-title">
          
            部署Hexo
          
        </div>
      </a>
    
    
      <a href="/2019/about/" class="article-nav-link">
        <strong class="article-nav-caption">下一篇</strong>
        <div class="article-nav-title">About Me</div>
      </a>
    
  </nav>


  

  
  
<!-- valine评论 -->
<div id="vcomments-box">
    <div id="vcomments">
    </div>
</div>
<script src="//cdn1.lncld.net/static/js/3.0.4/av-min.js"></script>
<script src='https://cdn.jsdelivr.net/npm/valine@1.3.10/dist/Valine.min.js'></script>
<script>
    new Valine({
        el: '#vcomments',
        app_id: 'QExPaN3yEdYGXDLijnPKdTc8-MdYXbMMI',
        app_key: 'kyQzz6yRJkdRHcMm0tpOvSYY',
        path: window.location.pathname,
        notify: 'true',
        verify: 'false',
        avatar: 'mp',
        placeholder: '给我的文章加点评论吧~',
        recordIP: true
    });
    const infoEle = document.querySelector('#vcomments .info');
    if (infoEle && infoEle.childNodes && infoEle.childNodes.length > 0) {
        infoEle.childNodes.forEach(function (item) {
            item.parentNode.removeChild(item);
        });
    }
</script>
<style>
    #vcomments-box {
        padding: 5px 30px;
    }

    @media screen and (max-width: 800px) {
        #vcomments-box {
            padding: 5px 0px;
        }
    }

    #vcomments-box #vcomments {
        background-color: #fff;
    }

    .v .vlist .vcard .vh {
        padding-right: 20px;
    }

    .v .vlist .vcard {
        padding-left: 10px;
    }
</style>

  

  
  
  

</article>
</section>
      <footer class="footer">
  <div class="outer">
    <ul class="list-inline">
      <li>
        &copy;
        2020-2021
        ZHF
      </li>
      <li>
        
        Powered by
        
        
        <a href="https://hexo.io" target="_blank">Hexo</a> Theme <a href="https://github.com/Shen-Yu/hexo-theme-ayer" target="_blank">Ayer</a>
        
      </li>
    </ul>
    <ul class="list-inline">
      <li>
        
        
        <span>
  <i>PV:<span id="busuanzi_value_page_pv"></span></i>
  <i>UV:<span id="busuanzi_value_site_uv"></span></i>
</span>
        
      </li>
      
      <li>
        <!-- cnzz统计 -->
        
        <script type="text/javascript" src=''></script>
        
      </li>
    </ul>
  </div>
</footer>
      <div class="to_top">
        <div class="totop" id="totop">
  <i class="ri-arrow-up-line"></i>
</div>
      </div>
    </main>
    <aside class="sidebar">
      <button class="navbar-toggle"></button>
<nav class="navbar">
  
  <div class="logo">
    <a href="/"><img src="/images/ayer-side.svg" alt="岛"></a>
  </div>
  
  <ul class="nav nav-main">
    
    <li class="nav-item">
      <a class="nav-item-link" href="/">主页</a>
    </li>
    
    <li class="nav-item">
      <a class="nav-item-link" href="/archives">归档</a>
    </li>
    
    <li class="nav-item">
      <a class="nav-item-link" href="/categories">分类</a>
    </li>
    
    <li class="nav-item">
      <a class="nav-item-link" href="/tags">标签</a>
    </li>
    
    <li class="nav-item">
      <a class="nav-item-link" href="/tags/%E6%97%85%E8%A1%8C/">旅行</a>
    </li>
    
    <li class="nav-item">
      <a class="nav-item-link" target="_blank" rel="noopener" href="https://500px.me/ZHFHZ">摄影</a>
    </li>
    
    <li class="nav-item">
      <a class="nav-item-link" href="/2019/about">关于我</a>
    </li>
    
  </ul>
</nav>
<nav class="navbar navbar-bottom">
  <ul class="nav">
    <li class="nav-item">
      
      <a class="nav-item-link nav-item-search"  title="Search">
        <i class="ri-search-line"></i>
      </a>
      
      
      <a class="nav-item-link" target="_blank" href="/atom.xml" title="RSS Feed">
        <i class="ri-rss-line"></i>
      </a>
      
    </li>
  </ul>
</nav>
<div class="search-form-wrap">
  <div class="local-search local-search-plugin">
  <input type="search" id="local-search-input" class="local-search-input" placeholder="Search...">
  <div id="local-search-result" class="local-search-result"></div>
</div>
</div>
    </aside>
    <div id="mask"></div>

<!-- #reward -->
<div id="reward">
  <span class="close"><i class="ri-close-line"></i></span>
  <p class="reward-p"><i class="ri-cup-line"></i>请我喝杯咖啡吧~</p>
  <div class="reward-box">
    
    <div class="reward-item">
      <img class="reward-img" src="/images/alipay.jpg">
      <span class="reward-type">支付宝</span>
    </div>
    
    
    <div class="reward-item">
      <img class="reward-img" src="/images/wechat.jpg">
      <span class="reward-type">微信</span>
    </div>
    
  </div>
</div>
    
<script src="/js/jquery-2.0.3.min.js"></script>


<script src="/js/share.js"></script>


<script src="/js/lazyload.min.js"></script>


<script>
  try {
    var typed = new Typed("#subtitle", {
      strings: ['面朝大海，春暖花开', '愿你一生努力，一生被爱', '想要的都拥有，得不到的都释怀'],
      startDelay: 0,
      typeSpeed: 200,
      loop: true,
      backSpeed: 100,
      showCursor: true
    });
  } catch (err) {
  }

</script>




<script src="/js/tocbot.min.js"></script>

<script>
  // Tocbot_v4.7.0  http://tscanlin.github.io/tocbot/
  tocbot.init({
    tocSelector: '.tocbot',
    contentSelector: '.article-entry',
    headingSelector: 'h1, h2, h3, h4, h5, h6',
    hasInnerContainers: true,
    scrollSmooth: true,
    scrollContainer: 'main',
    positionFixedSelector: '.tocbot',
    positionFixedClass: 'is-position-fixed',
    fixedSidebarOffset: 'auto',
    onClick: (e) => {
      $('.toc-link').removeClass('is-active-link');
      $(`a[href=${e.target.hash}]`).addClass('is-active-link');
      $(e.target.hash).scrollIntoView();
      return false;
    }
  });
</script>



<script src="https://cdn.jsdelivr.net/npm/jquery-modal@0.9.2/jquery.modal.min.js"></script>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/jquery-modal@0.9.2/jquery.modal.min.css">
<script src="https://cdn.jsdelivr.net/npm/justifiedGallery@3.7.0/dist/js/jquery.justifiedGallery.min.js"></script>

<script src="/js/ayer.js"></script>



<!-- Root element of PhotoSwipe. Must have class pswp. -->
<div class="pswp" tabindex="-1" role="dialog" aria-hidden="true">

    <!-- Background of PhotoSwipe. 
         It's a separate element as animating opacity is faster than rgba(). -->
    <div class="pswp__bg"></div>

    <!-- Slides wrapper with overflow:hidden. -->
    <div class="pswp__scroll-wrap">

        <!-- Container that holds slides. 
            PhotoSwipe keeps only 3 of them in the DOM to save memory.
            Don't modify these 3 pswp__item elements, data is added later on. -->
        <div class="pswp__container">
            <div class="pswp__item"></div>
            <div class="pswp__item"></div>
            <div class="pswp__item"></div>
        </div>

        <!-- Default (PhotoSwipeUI_Default) interface on top of sliding area. Can be changed. -->
        <div class="pswp__ui pswp__ui--hidden">

            <div class="pswp__top-bar">

                <!--  Controls are self-explanatory. Order can be changed. -->

                <div class="pswp__counter"></div>

                <button class="pswp__button pswp__button--close" title="Close (Esc)"></button>

                <button class="pswp__button pswp__button--share" style="display:none" title="Share"></button>

                <button class="pswp__button pswp__button--fs" title="Toggle fullscreen"></button>

                <button class="pswp__button pswp__button--zoom" title="Zoom in/out"></button>

                <!-- Preloader demo http://codepen.io/dimsemenov/pen/yyBWoR -->
                <!-- element will get class pswp__preloader--active when preloader is running -->
                <div class="pswp__preloader">
                    <div class="pswp__preloader__icn">
                        <div class="pswp__preloader__cut">
                            <div class="pswp__preloader__donut"></div>
                        </div>
                    </div>
                </div>
            </div>

            <div class="pswp__share-modal pswp__share-modal--hidden pswp__single-tap">
                <div class="pswp__share-tooltip"></div>
            </div>

            <button class="pswp__button pswp__button--arrow--left" title="Previous (arrow left)">
            </button>

            <button class="pswp__button pswp__button--arrow--right" title="Next (arrow right)">
            </button>

            <div class="pswp__caption">
                <div class="pswp__caption__center"></div>
            </div>

        </div>

    </div>

</div>

<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/photoswipe@4.1.3/dist/photoswipe.min.css">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/photoswipe@4.1.3/dist/default-skin/default-skin.min.css">
<script src="https://cdn.jsdelivr.net/npm/photoswipe@4.1.3/dist/photoswipe.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/photoswipe@4.1.3/dist/photoswipe-ui-default.min.js"></script>

<script>
    function viewer_init() {
        let pswpElement = document.querySelectorAll('.pswp')[0];
        let $imgArr = document.querySelectorAll(('.article-entry img:not(.reward-img)'))

        $imgArr.forEach(($em, i) => {
            $em.onclick = () => {
                // slider展开状态
                // todo: 这样不好，后面改成状态
                if (document.querySelector('.left-col.show')) return
                let items = []
                $imgArr.forEach(($em2, i2) => {
                    let img = $em2.getAttribute('data-idx', i2)
                    let src = $em2.getAttribute('data-target') || $em2.getAttribute('src')
                    let title = $em2.getAttribute('alt')
                    // 获得原图尺寸
                    const image = new Image()
                    image.src = src
                    items.push({
                        src: src,
                        w: image.width || $em2.width,
                        h: image.height || $em2.height,
                        title: title
                    })
                })
                var gallery = new PhotoSwipe(pswpElement, PhotoSwipeUI_Default, items, {
                    index: parseInt(i)
                });
                gallery.init()
            }
        })
    }
    viewer_init()
</script>




<script src="/js/busuanzi-2.3.pure.min.js"></script>



<script type="text/javascript" src="https://js.users.51.la/20544303.js"></script>

    
  </div>
</body>

</html>